package com.espirit.eap.manager.workflow;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import com.espirit.common.Form;
import com.espirit.common.WFMessage;
import com.espirit.eap.annotation.DomainModel;

@Entity
@DomainModel
public class FormMessage {
	public static final String SRC_CLASSNAME="formmessage_srcclassname";
	private Integer id;
	private WFMessage message;
	private Form form;
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@ManyToOne(targetEntity=WFMessage.class,fetch=FetchType.LAZY)
	public WFMessage getMessage() {
		return message;
	}
	public void setMessage(WFMessage message) {
		this.message = message;
	}
	
	@ManyToOne
	public Form getForm() {
		return form;
	}
	public void setForm(Form form) {
		this.form = form;
	}
	
}
